package array;

public class DefineArray {
	public static void main(String[] args) {
		// 1.动态赋值  a.先开辟空间   b.通过下标赋值
		int[] nums = new int[3];  // new int[3];  堆中开辟新的3个int连续空间
		nums[0] = 1;
		nums[1] = 2;
		nums[2] = 3;
		
		String[] names = new String[4];
		names[0] = "张乃升";
		names[1] = "张乃升";
		names[2] = "张乃升";
		
		boolean[] sexs = new boolean[4];
		
		// 2.动态赋值 -> 静态赋值
		int[] numbers = new int[] {1,2,3,4,5};
		numbers[0] = 11;
	
	}
}
